<%@ page import="ru.spbu.mm.diploma.client.service.SessionService" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j" %>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="t" uri="http://myfaces.apache.org/tomahawk" %>
<%@ page contentType="text/html; charset=utf-8" language="java" %>
<%
    if (!SessionService.getInstance().checkRights((Integer) SessionService.getInstance().getSession().getAttribute("USERROLE_ID"), "groups_and_risks.jsp")) {
        response.sendRedirect("accessError.faces");
    }
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Groups of Risks.</title>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
</head>
 <body>
     <div class="container">
         <div class="header"><!-- end .header -->
        <f:view>
        <h:form>
        <table width="960" border="1">
            <tr>
                <td width="840">&nbsp;</td>
                <td width="100">


                    <h:commandButton action="#{loginController.logOut}" value="LogOut Intra"
                                     accesskey="l" immediate="true" styleClass="submit">
                    </h:commandButton>
                    </h:form>

                </td>
            </tr>
        </table>
    </div>
         <div class="content">
         <h:form id="GroupRisk">
         <h:panelGrid columns="2" width="100%">

            <rich:tree style="width:300px" nodeSelectListener="#{riskController.processSelection}"
                reRender="selectedNode" ajaxSubmitSelection="true"  switchType="client"
                value="#{riskController.treeNode}" var="item" ajaxKeys="#{null}" >
            </rich:tree>
        <h:outputText escape="false" value="Description: #{riskController.nodeTitle}" id="selectedNode" />

        </h:panelGrid>
        </h:form>
           </f:view>
            </div>
     </div>
</body>
</html>
